Welcome Guest, you are in: Login
CTS Futures

Page History: MarketData Snapshot

Compare Page Revisions



« Older Revision - Back to Page History - Newer Revision »


Page Revision: 2016/06/15 17:55



Describing Market Data

The T4 FIX API support streaming of market data with the Market Data Snapshot message (Tag 35=W).

The Market Data Snapshot messages are used as the response to a Market Data Request message. It can be used to transmit a list of quotes, a list of trades, index values, opening, closing, settlement, high, low, the trade volume or open interest for a security, or any combination of these. Market Data Snapshot messages sent as the result of a Market Data Request message will specify the corresponding MDReqID (Tag 262). Unsolicited Market Data Snapshot messages may also be received by a T4 FIX client.

The Market Data message format used for a Snapshot (Tag 263=0) , or a Snapshot + Updates (Tag 263=1) is as follows: For Market Data Requests where a Bid or Offer is added, changed, or deleted, every update to a Market Data Entry results in a new Market Data message that contains the entirety of the data requested for that instrument, not just the changed Market Data Entry. In other words, both sides of the market, or just one side in the case of a request of only bids or offers, for the depth requested, is sent in one Market Data Snapshot message.

Matching Snapshots against Market Data Requests

Market Data Snapshot messages can be matched (by the FIX API client) through either the (unique) SecurityID (Tag 48) or by the Request ID (MDReqID - Tag 262) of the Market Data Request that initiated the streaming. SecurityID (Tag 48) is the default identification mechanism. If the client requests to identify by MDReqID, the SecurityID will not be included in the market data snapshot message (and viceversa).

Chart Data Responses

The Market Data SnapShot message also carries Chart (Time-and-Sales) Data as requested with the Market Data Request message. Chart Data details are included in the MDEntries.ChartData repeating group as labeled with the MDEntryType (Tag 269). Compression of Chart Data is optional. It is indicated by the ExecInst field equal to COMPRESSED_TAGS (18=T). Compressed data is carried as a (Base-64) encoded payload in the EncodedText field (Tag 255). Once uncompressed, this payload avails sequential chart data through the corresponding Tag-Value pairs (Tags 3206 to 3278).


Message Dictionary

TagField NameReq'dComments
Standard HeaderY
262MDReqIDNIdentifier of Market Data Request.
48SecurityIDNSecurity Identifier. T4 Market ID.
55SymbolNSymbol. T4 Contract ID.
207SecurityExchangeNSecurity Exchange. T4 Exchange ID.
387TotalVolumeTradedNTotal quantity of volume traded across all levels.
965SecurityStatusNMarket Status of Security. For Chart Data, Status of Market Data Chart Request. Valid values are:
0 = Undefined
1 = PreOpen
2 = Open
3 = RestrictedOpen
4 = PreClosed
5 = Closed
6 = Suspended
7 = Halted
8 = Failed (also Chart Data)
9 = PreCross
10 = Cross
11 = Expired
12 = Rejected
13 = Unavailable
14 = NoPermission (only Chart Data)
15 = ExceedsLimit (only Chart Data)
16 = Success (only Chart Data)
3200TradeDateStartNStart Date of multiple-day Chart Data request. Used for SubscriptionRequestTypes of TIMEANDSALES_DATA_BATCH (263=4) and TIMEANDSALES_DATA_CONTRACT (263=5). Displayed in FIX UTCDateOnly format (e.g. 20131517). Date is local CST (Chicago) date and not relative to GMT.
3201TradeDateEndNEnd Date of multiple-day Chart Data request. Used for SubscriptionRequestTypes of TIMEANDSALES_DATA_BATCH (263=4). Displayed in FIX UTCDateOnly format (e.g. 20131517). Date is local CST (Chicago) date and not relative to GMT.
3202SessionStartTimeNStart of Session for a user-defined time-span of a Chart Data request. Used for SubscriptionRequestTypes of TIMEANDSALES_DATA_BATCH (263=4). Displayed in FIX UTCTimeOnly format (e.g. 14:11:01.887, 14:11:01). Time is local CST (Chicago) time and not GMT.
3203SessionEndTimeNEnd of Session for a user-defined time-span of a Chart Data request. Used for SubscriptionRequestTypes of TIMEANDSALES_DATA_BATCH (263=4). Displayed in FIX UTCTimeOnly format (e.g. 14:11:01.887, 14:11:01). Time is local CST (Chicago) time and not GMT.
3204ChartTypeNChart Type as pertaining to the (time) granularity of Chart Data Snapshot responses. Valid values are:
0 = Tick
1 = Second
2 = Minute
3 = Hour
4 = Day
5 = Time Price Opportunity (TPO)
6 = TickChange
3205DataFormatNThe compression format of the response to the Chart Data request. Not applicable to Contract Chart Data requests (263=5). Valid values are:
U = UNCOMPRESSED. All Chart Data is returned as tags included in the MDEntries repeating group of the Market Data Snapshot message.
T = COMPRESSED_TAGS. All Chart Data is returned as a payload of compressed and Base-64 encoded Tag-Value pairs in the EncodedText field (Tag 355) of the Market Data Snapshot message. Compression is implemented with the Lempel-Ziv-Huffman (Deflate) algorithm.
Z = COMPRESSED_TAGS_ZLIB. All Chart Data is returned as a payload of compressed and Base-64 encoded Tag-Value pairs in the EncodedText field (Tag 355) of the Market Data Snapshot message. Compression is implemented with the ZLib library.
2 = T4BIN. Internal representation of Chart Data store.
268NoMDEntriesYNumber of Market Data entries to follow
Start Repeating Group
269MDEntryTypeYMarket Data Entry Type. Must be the first field in this repeating group. Valid values are:
0 = Bid
1 = Offer
2 = Implied Bid
3 = Implied Offer
4 = Last Trade
6 = Settlement
7 = Session High
8 = Session Low
9 = Session Open
K = Limit High
L = Limit Low
B = Trade Volume
Y = Chart Data Batch. Multiple days with a session time span.
Z = Chart Data Contract. Single day Total Traded Volume (TTV) for all markets of a contract. MarketId in Tag 278 with TTV in Tag 271.
278MDEntryIDNMarket ID (of Chart Data Contract).
270MDEntryPxNEntry Price.
271MDEntrySizeNEntry Size (or Volume).
273MDEntryTimeNTime for current entry.
274TickDirectionNWhether the trade occurred at the bid or offer. Only applicable when MDEntryType = LastTrade in trade snapshots. Valid values are:
0 = AtTheOffer
2 = AtTheBid
277TradeConditionNWhether the trade occurred as a result of a spread. Only applicable when MDEntryType = LastTrade. Only valid value: AA = Due to Spread.
18ExecInstNExecution Instruction as pertaining to the Compression Data Format. Valid Values are:
T = COMPRESSED_TAGS. Compressed Base-64 encoded tag-value pairs in EncodedText field (Tag 355). Compressed with Deflate's LZH.
Z = COMPRESSED_TAGS_ZLIB. Compressed Base-64 encoded tag-value pairs in EncodedText field (Tag 355). Compressed with Zlib library.
U = UNCOMPRESSED. Uncompressed Tag value pairs.
E = UNCOMPRESSED_ENCODED. Uncompressed Base-64 encoded data in EncodedText field (Tag 355).
1023MDEntryLevelNBook level this entry pertains to; an integer value from 1 to 10.
1020TradeVolumeNTrade volume for this MDEntry.
75TradeDateNTrade date for this MDEntry (format YYYYMMDD).
3301OrderVolumesNOrder Volumes that make up a trade (if available). Only applicable to MDEntryType = 4. Volumes are separated by a semicolon (";").
3210NoChartDataNNumber of Chart Data entries to follow
Start Repeating Group
3212ChangeNChart Data Change associated with this Chart Data entry
0 = None
1 = Trade
2 = Quote
3 = MarketMode
4 = Settlement
5 = TradeBar
6 = TradeDate
7 = TPO (Time Price Opportunity)
8 = TickChange
9 = RFQ (Request for Quote)
10 = HeldSettlement
11 = ClearedVolume
12 = OpenInterest
13 = VWAP (Volume Weighted Average Pricing)
15 = Market Definition
3206NumeratorNPrice Numerator of security
3207DenominatorNPrice Denominator of security
3208PriceCodeNInternal Price code of security
3209TickValueNPrice Tick Value of security
3211TradeDateChartsNTrade Date for Chart Data Request (in UTCDateOnly format)
3213MarketModeTimeNDate-Time pertaining to this Market Mode Entry (in UTCTimestamp format)
3214MarketModeNMarket Mode for Chart Data Request
3216SettlementTimeNDate-Time pertaining to this Settlement Entry (in UTCTimestamp format)
3217SettlementNSettlement for Chart Data Request
3219HeldSettlementTimeNDate-Time pertaining to this Held Settlement Entry (in UTCTimestamp format)
3220HeldSettlementNHeld Settlement for Chart Data Request
3222OpenInterestTimeNDate-Time pertaining to this Open Interest Entry (in UTCTimestamp format)
3223OpenInterestNOpen Interest for Chart Data Request
3225ClearedVolumeTimeNDate-Time pertaining to this Cleared Volume Entry (in UTCTimestamp format)
3226ClearedVolumeNCleared Volume for Chart Data Request
3228VWAPTimeNDate-Time pertaining to this VWAP Entry (in UTCTimestamp format)
3229VWAPNVWAP for Chart Data Request
3231QuoteTimeNDate-Time pertaining to this Quote Entry (in UTCTimestamp format)
3232BidTicksNBid Price in Ticks
3233BidRealVolumeNBid Real Volume
3234BidImpliedVolumeNBids Implied Volume
3235OfferTicksNOffer Price in Ticks
3236OfferRealVolumeNOffer Real Volume
3237OfferImpliedVolumeNOffer Implied Volume
3239TPOStartTimeNStart Time pertaining to this TPO Entry (in UTCTimestamp format)
3240TPOTicksNPrice Ticks of TPO
3241TPOVolumeNVolume of TPO
3242TPOVolumeAtBidNVolume at the Bid
3243TPOVolumeAtOfferNVolume at the Offer
3244TPOIsOpeningNTransaction is opening for TPO (Y=Yes, N=No)
3245TPOIsClosingNTransaction is closing for TPO (Y=Yes, N=No)
3247TradeTimeNStart Time pertaining to this Trade Entry (in UTCTimestamp format)
3248TradeVolumeChartsNTrade Volume
3249TradeTickValueNPrice Tick Value for Trade
3250TotalTradedVolumeNTotal Trade Volume
3251DueToSpreadNWhether the Trade corresponds to a Spread Strategy (Y=Yes, N=No)
3252AtBidOrOfferNAt Bid or Offer Transaction Type. Valid values are:
1 = Buy
2 = Sell
3253TradeOrderVolumesNOrder Volumes that make up a trade (if available). Only applicable to Change = 1. Volumes are separated by a semicolon (";").
3254BarStartTimeNStart Time for this TradeBar Entry (in UTCTimestamp format)
3255BarCloseTimeNClose Time for this TradeBar Entry (in UTCTimestamp format)
3256BarOpenTicksNTradeBar Open Price in Ticks
3257BarHighTicksNTradeBar High Price in Ticks
3258BarLowTicksNTradeBar Low Price in Ticks
3259BarCloseTicksNTradeBar Close Price in Ticks
3260BarVolumeNTradeBar Total Volume
3261BarBidVolumeNTradeBar Bid Volume
3262BarOfferVolumeNTradeBar Offer Volume
3263BarTradeCountNTotal number of trades for this TradeBar
3264BarTradesAtBidNNumber of Trades at Bid for this TradeBar
3265BarTradesAtOfferNNumber of Trades at Offer for this TradeBar
3267TickChangeStartTimeNStart Time for this Tick Change Entry (in UTCTimestamp format)
3268TickChangeCloseTimeNClose Time for this Tick Change Entry (in UTCTimestamp format)
3269TickChangeVolumeNTickChange Total Volume
3270TickChangeBidVolumeNTickChange Bid Volume
3271TickChangeOfferVolumeNTickChange Offer Volume
3272TickChangeTradeCountNTotal number of trades for this TickChange
3273TickChangeTradesAtBidNNumber of Trades at Bid for this TickChange
3274TickChangeTradesAtOfferNNumber of Trades at Offer for this TickChange
3276RFQTimeNStart Time pertaining to this RFQ (in UTCTimestamp format)
3277BuySellNTransaction Type for this RFQ. Valid values are:
1 = Buy
2 = Sell
3278VolumeNVolume for this RFQ
End Repeating Group
354EncodedTextLengthNLength of Encoded Text.
355EncodedTextNChart Data Only. Base-64 encoded text of compressed Chart Data tags. For the COMPRESSED_TAGS data format (Tag 18=T), it carries the encoded tag-value pairs of all Chart Data tags (Tag 3206 to Tag 3278 above). If compressed by Zlib, the compressed payload (as found in the EncodedText tag) is blocked in multiples of 30,000 bytes (regardless of the size of the MarketData SnapShot message). The start of such payload provides the size of all aggregated blocks (a 32-bit integer) and the number of subsequent blocks (a 16-bit integer). Each following block is preceded by its size (a 32-bit integer).
3279EncodedTextCRCNThe (Base-64 encoded) Addler-32bit Cyclic Redundancy Check (CRC) of the Uncompressed payload. Only available for Deflate compressed packages. This can be used to frame a Deflate stream for Zlib decompression per RFC 1950. To frame the Deflate stream, a header of 0x78, 0x9C can be used.
End Repeating Group
Standard TrailerY

Sample Messages

Market Data Snapshot of Market with a 1 book level (Top of Book)

<< 10/11/2012 2:58:04 PM  [fixmarketdatasnapshot] 34=11479|49=T4|56=T4Example|50=T4FIX|52=20121011-19:58:03.971|55=ZT|48=CME_20121200_ZTZ2|207=CME_F|387=4785|268=5|269=0|270=110.203125|271=224|1023=1|269=1|270=110.21875|271=326|1023=1|269=2|270=110.1875|271=1|1023=1|269=3|270=110.21875|271=3|1023=1|269=4|270=110.2109375|271=1|
[FIXMARKETDATASNAPSHOT]
[MsgSeqNum] 34 = 11479
[SenderCompID] 49 = T4
[TargetCompID] 56 = T4Example
[SenderSubID] 50 = T4FIX
[SendingTime] 52 = 20121011-19:58:03.971
[Symbol] 55 = ZT
[SecurityID] 48 = CME_20121200_ZTZ2
[SecurityExchange] 207 = CME_F
[TotalVolumeTraded] 387 = 4785
[NoMDEntries] 268 = 5
[MDEntryType] 269 = 0 (BID)
[MDEntryPx] 270 = 110.203125
[MDEntrySize] 271 = 224
[MDPriceLevel] 1023 = 1
[MDEntryType] 269 = 1 (OFFER)
[MDEntryPx] 270 = 110.21875
[MDEntrySize] 271 = 326
[MDPriceLevel] 1023 = 1
[MDEntryType] 269 = 2 (IMPLIED_BID)
[MDEntryPx] 270 = 110.1875
[MDEntrySize] 271 = 1
[MDPriceLevel] 1023 = 1
[MDEntryType] 269 = 3 (IMPLIED_OFFER)
[MDEntryPx] 270 = 110.21875
[MDEntrySize] 271 = 3
[MDPriceLevel] 1023 = 1
[MDEntryType] 269 = 4 (TRADE)
[MDEntryPx] 270 = 110.2109375
[MDEntrySize] 271 = 1

Market Data Snapshot for non-book entries

<< 10/11/2012 2:58:04 PM  [fixmarketdatasnapshot] 34=11480|49=T4|56=T4Example|50=T4FIX|52=20121011-19:58:04.002|55=ZT|48=CME_20121200_ZTZ2|207=CME_F|268=22|269=6|270=110.21875|269=7|270=110.21875|269=7|270=110|269=B|270=0|271=4785|1023=0|269=B|270=110|271=260|1023=1|269=B|270=110.0078125|271=10|1023=2|269=B|270=110.0234375|271=10|1023=3|269=B|270=110.0390625|271=80|1023=4|269=B|270=110.0546875|271=10|1023=5|269=B|270=110.0703125|271=10|1023=6|269=B|270=110.0859375|271=10|1023=7|269=B|270=110.1015625|271=10|1023=8|269=B|270=110.1171875|271=10|1023=9|269=B|270=110.1328125|271=25|1023=10|269=B|270=110.1484375|271=20|1023=11|269=B|270=110.15625|271=50|1023=12|269=B|270=110.1640625|271=35|1023=13|269=B|270=110.1796875|271=25|1023=14|269=B|270=110.1953125|271=156|1023=15|269=B|270=110.203125|271=21|1023=16|269=B|270=110.2109375|271=4012|1023=17|269=B|270=110.21875|271=31|1023=18|
[FIXMARKETDATASNAPSHOT]
[MsgSeqNum] 34 = 11480
[SenderCompID] 49 = T4
[TargetCompID] 56 = T4Example
[SenderSubID] 50 = T4FIX
[SendingTime] 52 = 20121011-19:58:04.002
[Symbol] 55 = ZT
[SecurityID] 48 = CME_20121200_ZTZ2
[SecurityExchange] 207 = CME_F
[NoMDEntries] 268 = 22
[MDEntryType] 269 = 6 (SETTLEMENT_PRICE)
[MDEntryPx] 270 = 110.21875
[MDEntryType] 269 = 7 (TRADING_SESSION_HIGH_PRICE)
[MDEntryPx] 270 = 110.21875
[MDEntryType] 269 = 7 (TRADING_SESSION_HIGH_PRICE)
[MDEntryPx] 270 = 110
[MDEntryType] 269 = B (TRADE_VOLUME)
[MDEntryPx] 270 = 0
[MDEntrySize] 271 = 4785
[MDPriceLevel] 1023 = 0
[MDEntryType] 269 = B (TRADE_VOLUME)
[MDEntryPx] 270 = 110
[MDEntrySize] 271 = 260
[MDPriceLevel] 1023 = 1
[MDEntryType] 269 = B (TRADE_VOLUME)
[MDEntryPx] 270 = 110.0078125
[MDEntrySize] 271 = 10
[MDPriceLevel] 1023 = 2
[MDEntryType] 269 = B (TRADE_VOLUME)
[MDEntryPx] 270 = 110.0234375
[MDEntrySize] 271 = 10
[MDPriceLevel] 1023 = 3
[MDEntryType] 269 = B (TRADE_VOLUME)
[MDEntryPx] 270 = 110.0390625
[MDEntrySize] 271 = 80
[MDPriceLevel] 1023 = 4
[MDEntryType] 269 = B (TRADE_VOLUME)
[MDEntryPx] 270 = 110.0546875
[MDEntrySize] 271 = 10
[MDPriceLevel] 1023 = 5
[MDEntryType] 269 = B (TRADE_VOLUME)
[MDEntryPx] 270 = 110.0703125
[MDEntrySize] 271 = 10
[MDPriceLevel] 1023 = 6
[MDEntryType] 269 = B (TRADE_VOLUME)
[MDEntryPx] 270 = 110.0859375
[MDEntrySize] 271 = 10
[MDPriceLevel] 1023 = 7
[MDEntryType] 269 = B (TRADE_VOLUME)
[MDEntryPx] 270 = 110.1015625
[MDEntrySize] 271 = 10
[MDPriceLevel] 1023 = 8
[MDEntryType] 269 = B (TRADE_VOLUME)
[MDEntryPx] 270 = 110.1171875
[MDEntrySize] 271 = 10
[MDPriceLevel] 1023 = 9
[MDEntryType] 269 = B (TRADE_VOLUME)
[MDEntryPx] 270 = 110.1328125
[MDEntrySize] 271 = 25
[MDPriceLevel] 1023 = 10
[MDEntryType] 269 = B (TRADE_VOLUME)
[MDEntryPx] 270 = 110.1484375
[MDEntrySize] 271 = 20
[MDPriceLevel] 1023 = 11
[MDEntryType] 269 = B (TRADE_VOLUME)
[MDEntryPx] 270 = 110.15625
[MDEntrySize] 271 = 50
[MDPriceLevel] 1023 = 12
[MDEntryType] 269 = B (TRADE_VOLUME)
[MDEntryPx] 270 = 110.1640625
[MDEntrySize] 271 = 35
[MDPriceLevel] 1023 = 13
[MDEntryType] 269 = B (TRADE_VOLUME)
[MDEntryPx] 270 = 110.1796875
[MDEntrySize] 271 = 25
[MDPriceLevel] 1023 = 14
[MDEntryType] 269 = B (TRADE_VOLUME)
[MDEntryPx] 270 = 110.1953125
[MDEntrySize] 271 = 156
[MDPriceLevel] 1023 = 15
[MDEntryType] 269 = B (TRADE_VOLUME)
[MDEntryPx] 270 = 110.203125
[MDEntrySize] 271 = 21
[MDPriceLevel] 1023 = 16
[MDEntryType] 269 = B (TRADE_VOLUME)
[MDEntryPx] 270 = 110.2109375
[MDEntrySize] 271 = 4012
[MDPriceLevel] 1023 = 17
[MDEntryType] 269 = B (TRADE_VOLUME)
[MDEntryPx] 270 = 110.21875
[MDEntrySize] 271 = 31
[MDPriceLevel] 1023 = 18

Chart Data Batch Response (UnCompressed)


<< 06/26/2013 05:29:58.522 PM  [fixmarketdatasnapshot] 34=14|49=T4|56=T4Example|50=T4FIX|52=20130626-22:29:58.522|262=mdc-6/26/2013 5:29:58 PM-0|55=ZC|48=LVCME_20121200_ZCZ2|207=LVCME_C|965=16|3200=20121213|3201=20121213|3202=09:00:00.000|3203=09:10:00.000|3204=0|3205=2|268=1|269=Y|75=20121213|3210=20|3212=6|3211=20121213|3212=3|3213=20121212-22:59:30.004|3214=6|3212=3|3213=20121212-23:00:00.167|3214=2|3212=0|3206=25|3207=100|3208=MC|3209=12.5|3212=11|3225=20121213-07:09:06.379|3226=2342|3212=12|3222=20121213-07:09:06.379|3223=2445|3212=12|3222=20121213-14:30:52.193|3223=2147|3212=1|3247=20121213-15:04:28.713|3248=1|3249=72100|3250=260|3251=Y|3252=0|3212=1|3247=20121213-15:04:28.713|3248=1|3249=72100|3250=261|3251=Y|3252=0|3212=1|3247=20121213-15:05:03.121|3248=1|3249=72100|3250=262|3251=N|3252=1|3212=1|3247=20121213-15:06:58.047|3248=1|3249=72175|3250=263|3251=N|3252=2|3212=1|3247=20121213-15:06:58.047|3248=1|3249=72175|3250=264|3251=N|3252=2|3212=1|3247=20121213-15:06:58.047|3248=1|3249=72175|3250=265|3251=N|3252=2|3212=1|3247=20121213-15:06:58.047|3248=1|3249=72175|3250=266|3251=N|3252=2|3212=3|3213=20121213-20:00:00.002|3214=7|3212=4|3216=20121213-20:15:06.096|3217=71225|3212=10|3219=20121213-20:15:06.096|3220=71225|3212=3|3213=20121213-20:30:00.020|3214=1|3212=3|3213=20121213-22:00:00.014|3214=5|3212=3|3213=20121213-22:45:00.038|3214=1|
[FIXMARKETDATASNAPSHOT]
[MsgSeqNum] 34 = 14
[SenderCompID] 49 = T4
[TargetCompID] 56 = T4Example
[SenderSubID] 50 = T4FIX
[SendingTime] 52 = 20130626-22:29:58.522
[MDReqID] 262 = mdc-6/26/2013 5:29:58 PM-0
[Symbol] 55 = ZC
[SecurityID] 48 = LVCME_20121200_ZCZ2
[SecurityExchange] 207 = LVCME_C
[SecurityStatus] 965 = 16 (SUCCESS)
[TradeDateStart] 3200 = 20121213
[TradeDateEnd] 3201 = 20121213
[SessionStartTime] 3202 = 09:00:00.000
[SessionEndTime] 3203 = 09:10:00.000
[ChartType] 3204 = 0 (TICK)
[DataFormat] 3205 = 2 (T4BIN)
[NoMDEntries] 268 = 1
[MDEntryType] 269 = Y (CHART_DATA_BATCH)
[TradeDate] 75 = 20121213
[NoChartDatas] 3210 = 20
[Change] 3212 = 6 (TRADE_DATE)
[TradeDateCharts] 3211 = 20121213
[Change] 3212 = 3 (MARKET_MODE)
[MarketModeTime] 3213 = 20121212-22:59:30.004
[MarketMode] 3214 = 6 (SUSPENDED)
[Change] 3212 = 3 (MARKET_MODE)
[MarketModeTime] 3213 = 20121212-23:00:00.167
[MarketMode] 3214 = 2 (OPEN)
[Change] 3212 = 0 (NONE)
[Numerator] 3206 = 25
[Denominator] 3207 = 100
[PriceCode] 3208 = MC
[TickValue] 3209 = 12.5
[Change] 3212 = 11 (CLEARED_VOLUME)
[ClearedVolumeTime] 3225 = 20121213-07:09:06.379
[ClearedVolume] 3226 = 2342
[Change] 3212 = 12 (OPEN_INTEREST)
[OpenInterestTime] 3222 = 20121213-07:09:06.379
[OpenInterest] 3223 = 2445
[Change] 3212 = 12 (OPEN_INTEREST)
[OpenInterestTime] 3222 = 20121213-14:30:52.193
[OpenInterest] 3223 = 2147
[Change] 3212 = 1 (TRADE)
[TradeTime] 3247 = 20121213-15:04:28.713
[TradeVolumeCharts] 3248 = 1
[TickValue] 3249 = 72100
[TotalTradedVolume] 3250 = 260
[DueToSpread] 3251 = Y
[AtBidOrOffer] 3252 = 0 (BUY)
[Change] 3212 = 1 (TRADE)
[TradeTime] 3247 = 20121213-15:04:28.713
[TradeVolumeCharts] 3248 = 1
[TickValue] 3249 = 72100
[TotalTradedVolume] 3250 = 261
[DueToSpread] 3251 = Y
[AtBidOrOffer] 3252 = 0 (BUY)
[Change] 3212 = 1 (TRADE)
[TradeTime] 3247 = 20121213-15:05:03.121
[TradeVolumeCharts] 3248 = 1
[TickValue] 3249 = 72100
[TotalTradedVolume] 3250 = 262
[DueToSpread] 3251 = N
[AtBidOrOffer] 3252 = 1 (SELL)
[Change] 3212 = 1 (TRADE)
[TradeTime] 3247 = 20121213-15:06:58.047
[TradeVolumeCharts] 3248 = 1
[TickValue] 3249 = 72175
[TotalTradedVolume] 3250 = 263
[DueToSpread] 3251 = N
[AtBidOrOffer] 3252 = 2
[Change] 3212 = 1 (TRADE)
[TradeTime] 3247 = 20121213-15:06:58.047
[TradeVolumeCharts] 3248 = 1
[TickValue] 3249 = 72175
[TotalTradedVolume] 3250 = 264
[DueToSpread] 3251 = N
[AtBidOrOffer] 3252 = 2
[Change] 3212 = 1 (TRADE)
[TradeTime] 3247 = 20121213-15:06:58.047
[TradeVolumeCharts] 3248 = 1
[TickValue] 3249 = 72175
[TotalTradedVolume] 3250 = 265
[DueToSpread] 3251 = N
[AtBidOrOffer] 3252 = 2
[Change] 3212 = 1 (TRADE)
[TradeTime] 3247 = 20121213-15:06:58.047
[TradeVolumeCharts] 3248 = 1
[TickValue] 3249 = 72175
[TotalTradedVolume] 3250 = 266
[DueToSpread] 3251 = N
[AtBidOrOffer] 3252 = 2
[Change] 3212 = 3 (MARKET_MODE)
[MarketModeTime] 3213 = 20121213-20:00:00.002
[MarketMode] 3214 = 7 (HALTED)
[Change] 3212 = 4 (SETTLEMENT)
[SettlementTime] 3216 = 20121213-20:15:06.096
[Settlement] 3217 = 71225
[Change] 3212 = 10 (HELD_SETTLEMENT)
[HeldSettlementTime] 3219 = 20121213-20:15:06.096
[HeldSettlement] 3220 = 71225
[Change] 3212 = 3 (MARKET_MODE)
[MarketModeTime] 3213 = 20121213-20:30:00.020
[MarketMode] 3214 = 1 (PRE_OPEN)
[Change] 3212 = 3 (MARKET_MODE)
[MarketModeTime] 3213 = 20121213-22:00:00.014
[MarketMode] 3214 = 5 (CLOSED)
[Change] 3212 = 3 (MARKET_MODE)
[MarketModeTime] 3213 = 20121213-22:45:00.038
[MarketMode] 3214 = 1 (PRE_OPEN)


Chart Data Contract Response (UnCompressed)


<< 01/22/2013 04:50:39.647 PM  [fixmarketdatasnapshot] 34=467|49=T4|56=T4Example|50=T4FIX|52=20130122-22:50:39.647|262=mdc-1/22/2013 4:50:39 PM-0|55=ZC|207=LVCME_C|965=16|3200=20120926-05:00:00.000|268=13|269=Z|278=LVCME_20121200_ZCZ2|271=150084|269=Z|278=LVCME_20130300_ZCH3|271=47894|269=Z|278=LVCME_20130500_ZCK3|271=12153|269=Z|278=LVCME_20130700_ZCN3|271=13963|269=Z|278=LVCME_20130900_ZCU3|271=1256|269=Z|278=LVCME_20131200_ZCZ3|271=4963|269=Z|278=LVCME_20140300_ZCH4|271=218|269=Z|278=LVCME_20140500_ZCK4|271=80|269=Z|278=LVCME_20140700_ZCN4|271=52|269=Z|278=LVCME_20140900_ZCU4|271=5|269=Z|278=LVCME_20141200_ZCZ4|271=174|269=Z|278=LVCME_20150700_ZCN5|271=5|269=Z|278=LVCME_20151200_ZCZ5|271=38|
[FIXMARKETDATASNAPSHOT]
[MsgSeqNum] 34 = 467
[SenderCompID] 49 = T4
[TargetCompID] 56 = T4Example
[SenderSubID] 50 = T4FIX
[SendingTime] 52 = 20130122-22:50:39.647
[MDReqID] 262 = mdc-1/22/2013 4:50:39 PM-0
[Symbol] 55 = ZC
[SecurityExchange] 207 = LVCME_C
[SecurityStatus] 965 = 16 (SUCCESS)
[TradeDateStart] 3200 = 20120926-05:00:00.000
[NoMDEntries] 268 = 13
[MDEntryType] 269 = Z (CHART_DATA_CONTRACT)
[MDEntryID] 278 = LVCME_20121200_ZCZ2
[MDEntrySize] 271 = 150084
[MDEntryType] 269 = Z (CHART_DATA_CONTRACT)
[MDEntryID] 278 = LVCME_20130300_ZCH3
[MDEntrySize] 271 = 47894
[MDEntryType] 269 = Z (CHART_DATA_CONTRACT)
[MDEntryID] 278 = LVCME_20130500_ZCK3
[MDEntrySize] 271 = 12153
[MDEntryType] 269 = Z (CHART_DATA_CONTRACT)
[MDEntryID] 278 = LVCME_20130700_ZCN3
[MDEntrySize] 271 = 13963
[MDEntryType] 269 = Z (CHART_DATA_CONTRACT)
[MDEntryID] 278 = LVCME_20130900_ZCU3
[MDEntrySize] 271 = 1256
[MDEntryType] 269 = Z (CHART_DATA_CONTRACT)
[MDEntryID] 278 = LVCME_20131200_ZCZ3
[MDEntrySize] 271 = 4963
[MDEntryType] 269 = Z (CHART_DATA_CONTRACT)
[MDEntryID] 278 = LVCME_20140300_ZCH4
[MDEntrySize] 271 = 218
[MDEntryType] 269 = Z (CHART_DATA_CONTRACT)
[MDEntryID] 278 = LVCME_20140500_ZCK4
[MDEntrySize] 271 = 80
[MDEntryType] 269 = Z (CHART_DATA_CONTRACT)
[MDEntryID] 278 = LVCME_20140700_ZCN4
[MDEntrySize] 271 = 52
[MDEntryType] 269 = Z (CHART_DATA_CONTRACT)
[MDEntryID] 278 = LVCME_20140900_ZCU4
[MDEntrySize] 271 = 5
[MDEntryType] 269 = Z (CHART_DATA_CONTRACT)
[MDEntryID] 278 = LVCME_20141200_ZCZ4
[MDEntrySize] 271 = 174
[MDEntryType] 269 = Z (CHART_DATA_CONTRACT)
[MDEntryID] 278 = LVCME_20150700_ZCN5
[MDEntrySize] 271 = 5
[MDEntryType] 269 = Z (CHART_DATA_CONTRACT)
[MDEntryID] 278 = LVCME_20151200_ZCZ5
[MDEntrySize] 271 = 38





Binary Data Encoding: Processing Market Data Snapshots in Binary Form

The CTS market data engine provides (raw) market data to all its internal clients (including FIX API, T4 API and T4Screen) in binary snapshot form. To conform to common practices within the FIX standard, the FIX API converts this binary snapshot data to Market Data Snapshots (Tag 35=W) and/or Market Data Incremental Refresh (Tag 35=X) messages. As such, the CTS binary depth books are converted to standard FIX tags (e.g. MDEntries tags - MDPriceLevel, MDEntrySize, MDEntryPx, etc.) that convey (to FIX API clients) the trade and depth composition of the markets. This is the standard mechanism used in the construction of Market Data Snapshot (Tag 35=W) and Market Data Incremental Refresh (Tag 35=X) messages.

Binary Data Encoding provides an alternative mechanism to build and consume FIX Market Data Snapshots (Tag 35=W). With Binary Data Encoding, the FIX conversion process (to standard tags) is substituted by the Base64 encoding of the binary snapshot packet. This Base64-encoded snapshot contains the complete and unaltered binary market data structure generated by the CTS market data engine. The binary data include all levels and books available for the requested market. Binary Data Encoding is requested with the Market Data Request (Tag 35=V) message with a Subscription Request Type of Snapshot + Updates (Tag 263=1) with a Data Format of Uncompressed Encoded (Tag 3205=E).

UnEncoding Packets

The Base64-encoded packet is included in the EncodedText field (Tag 355) of the Market Data Snapshot message. In a sole MDEntry, the packet is identified as uncompressed encoded data (ExecInst - Tag 18=E). The MDEntryType would further describe the packet as Packet-Depth-Encoded (Tag 269=d) for Depth Snapshots or Packet-Trade-Encoded (Tag 269=t) for Trade Snapshots. At the FIX API client end, the Base64-encoded text can be unencoded by standard methods. The resultant (unencoded) binary data will be identical to the binary message received by T4Screen front-end clients.

Parsing Unencoded Binary data

Parsing of the (unencoded) binary snapshot data will allow the FIX client to navigate and consume Trade and Depth Book prices and quantities. The little-endian structures of the (unencoded) binary data are presented below for both Packet-Depth-Encoding and Packet-Trade-Encoding.


1. Packet-Depth-Encoded Structure (Tag 269=d)

Offset in parentheses is representative of VolSize=4, TickSize=1 with LastTradeAndSpreadFlag and ImpliedDataOldFlag not set (i.e. False) and 10 levels of book depth (BidCount=OfferCount=10). No implied bids or offers (ImpBidCount=ImpOfferCount=0).


Name# of BytesOffsetDescription
MarketIndent40Ident of the market.
Numerator*44Price Numerator.
TickSize*18Size of Tick Fields. Usually equal to 1.
VolSize*19Size of Volume Fields. Usually equal to 2 or 4.
Mode110Market Mode.
Time811Time of packet (in ticks).
TotalTradedVolume*419Total Traded Volume.
Sequence823Internal Sequence.
ChangeBuffer131Change Buffer for this snapshot.
ChangeLevels132Change Levels for this snapshot.
BaseTicks (LastTradeTicks)*433Base ticks. Last Trade Ticks (if not a spread).
LastTradeTotalVolume*VolSize37Total volume traded at the last trade price since it became the last trade price (including spread leg trades if applicable).
LastTradeVolume*VolSize(41)Last trade volume that actually occurred (including spread leg trades if applicable).
LastTradeAndSpreadFlag*1(45)Boolean for Spread ticks and volume.
SpreadLastTradeTickDelta*TickSize if LastTradeAndSpreadFlag is true. Trade Ticks Spread Delta. (SpreadLastTradeTicks = BaseTicks + SpreadLastTradeTickDelta*Numerator).
SpreadLastTradeTotalVolume*VolSizeif LastTradeAndSpreadFlag is true. Total Volume of Spread.
SpreadLastTradeVolume*VolSizeif LastTradeAndSpreadFlag is true. Volume of Spread.
ImpliedDataOldFlag1(46)Boolean for Old implied data.
BidImpliedTicksTickSizeif ImpliedDataOldFlag is 1 or 3. Old Bid Implied Ticks.
BidImpliedVolumeVolSizeif ImpliedDataOldFlag is 1 or 3. Old Bid Implied Volume.
OfferImpliedTicksTickSizeif ImpliedDataOldFlag is 2 or 3. Old Offer Implied Ticks.
OfferImpliedVolumeVolSizeif ImpliedDataOldFlag is 2 or 3. Old Offer Implied Volume.
BidCount*1(47)Number of Bids. Repeat in pairs (TickDelta and Volume).
BidTickDelta*TickSizeRepeat (in pairs with BidVolume) For BidCount. Bid Tick Delta. (BidTick = BaseTicks + BidTickDelta*Numerator).
BidVolume*VolSizeRepeat (in pairs with BidTickDelta) For BidCount. Bid Volume.
OfferCount*1(98)Number of Offers. Repeat in pairs (TickDelta and Volume).
OfferTickDelta*TickSizeRepeat (in pairs with OfferVolume) For OfferCount. Offer Tick Delta. (OfferTick = BaseTicks + OfferTickDelta*Numerator).
OfferVolume*VolSizeRepeat (in pairs with OfferTickDelta) For OfferCount. Offer Volume.
ImpBidCount*1(149)Number of Implied Bids. Repeat in pairs (TickDelta and Volume).
ImpBidTickDelta*TickSizeRepeat For (in pairs with ImpBidVolume) ImpBidCount. Implied Bid Tick Delta. (ImpBidTick = BaseTicks + ImpBidTickDelta*Numerator).
ImpBidVolume*VolSizeRepeat (in pairs with ImpBidTickDelta) For ImpBidCount. Implied Bid Volume.
ImpOfferCount*1(150)Number of Implied Offers. Repeat in pairs (TickDelta and Volume).
ImpOfferTickDelta*TickSizeRepeat (in pairs with ImpOfferVolume) For ImpOfferCount. Implied Offer Tick Delta. (ImpOfferTick = BaseTicks + ImpOfferTickDelta*Numerator).
ImpOfferVolume*VolSizeRepeat (in pairs with ImpOfferTickDelta) For ImpOfferCount. Implied Offer Volume.
DueToSpread*1(151)Whether this trade was due to a spread or not. Boolean.
BidOrOffer*1(152)Whether this trade was at the bid or offer price. 1 = Buy, -1 = Sell.
MarketIDLength1(153)Number Of bytes for MarketID. If available.
MarketIDMarketIDLength(154)MarketID.


2. Packet-Trade-Encoded Structure (Tag 269=t)

Offset in parentheses is indicative of a MarketID of length 17 (e.g. "CME_20140300_ESH4")


Name# of BytesOffsetDescription
MarketIDLength1(0)Number Of bytes for MarketID. If available.
MarketIDMarketIDLengthMarketID.
Time8(18)Time of packet (in ticks).
LastTradeTotalVolume*4(26)Total volume traded at the last trade price since it became the last trade price.
LastTradeTicks*4(30)Last Trade Ticks.
LastTradeVolume*4(34)Last trade volume that actually occurred.
Sequence8(38)Internal Sequence.
DueToSpread*1(46)Whether this trade was due to a spread or not. Boolean.
BidOrOffer*1(47)Whether this trade was at the bid or offer price. 1 = Buy, -1 = Sell.

  • Important fields


Sample Messages - Binary Data Encoding

Sample messages for a Binary Encoding session are shown below. In the first message, the binary Encoding session is requested for Bid (Tag 269=0), Offer (Tag 269=1), ImpliedBid (Tag 269=2) and ImpliedOffer (Tag 269=3) books with a depth of 10 price levels (Tag 264=10) alongside trade Market Data snapshots (Tag 269=4). Following, two types of encoded Market Data Snapshot messages are received: (1) A Packet Depth Encoded snapshot (Tag 269=d) and (2) A Packet Trade Encoded Snapshot (Tag 269=t). In both cases, the binary snapshot is carried (as Base-64 encoded data) in the EncodedText field (Tag 355). The EncodedText of the Packet Depth Snapshot (sequence number 76) would conform to the structure of Table 1 above. The EncodedText of the Packet Trade Snapshot (sequence number 77) would conform to the structure of Table 2 above.

Requesting Binary Encoding Session
1 - MARKETDATAREQUEST
34=3|49=T4Example|56=T4|52=20131125-18:12:48.773|262=121248|263=1|264=10|265=3|1070=1|267=11|269=0|269=1|269=2|269=3|269=4|269=6|269=7|269=8|269=K|269=L|269=B|146=1|55=ES|48=CME_20131200_ESZ3|167=FUT|207=CME_Eq|3205=E|

[MsgSeqNum] 34 = 3
[SenderCompID] 49 = T4Example
[TargetCompID] 56 = T4
[SendingTime] 52 = 20131125-18:12:48.773
[MDReqID] 262 = 121248
[SubscriptionRequestType] 263 = 1 (SNAPSHOT_PLUS_UPDATES)
[MarketDepth] 264 = 10
[MDUpdateType] 265 = 3 (SMART_TRADE)
[MDQuoteType] 1070 = 1 (TICKS)
[NoMDEntryTypes] 267 = 11
[MDEntryType] 269 = 0 (BID)
[MDEntryType] 269 = 1 (OFFER)
[MDEntryType] 269 = 2 (IMPLIED_BID)
[MDEntryType] 269 = 3 (IMPLIED_OFFER)
[MDEntryType] 269 = 4 (TRADE)
[MDEntryType] 269 = 6 (SETTLEMENT_PRICE)
[MDEntryType] 269 = 7 (TRADING_SESSION_HIGH_PRICE)
[MDEntryType] 269 = 8 (TRADING_SESSION_LOW_PRICE)
[MDEntryType] 269 = K (LIMIT_HIGH_PRICE)
[MDEntryType] 269 = L (LIMIT_LOW_PRICE)
[MDEntryType] 269 = B (TRADE_VOLUME)
[NoRelatedSym] 146 = 1
[Symbol] 55 = ES
[SecurityID] 48 = CME_20131200_ESZ3
[SecurityType] 167 = FUT (FUTURE)
[SecurityExchange] 207 = CME_Eq
[DataFormat] 3205 = E (UNCOMPRESSED_ENCODED)

A Packet Depth Encoded Snapshot
2 - MARKETDATASNAPSHOT
34=76|49=T4|56=T4Example|52=20131125-18:13:02.163|48=CME_20131200_ESZ3|387=667827|965=2|268=1|269=d|18=E|354=148|355=JwgAABkAAACBgoLg65XS7rfQCLMwCgD+/////////4SBfsACAAoAAQABgIqA7QJ/wgN+HwV9LQV82wR79QR6EAZ5SAR4PQh3DwWKgZ0DglIGg4sGhBAGhQkGhhAHh0QFiFAGiQsFigMHgIABgQA=|

[MsgSeqNum] 34 = 76
[SenderCompID] 49 = T4
[TargetCompID] 56 = T4Example
[SendingTime] 52 = 20131125-18:13:02.163
[SecurityID] 48 = CME_20131200_ESZ3
[TotalVolumeTraded] 387 = 667827
[SecurityStatus] 965 = 2 (OPEN)
[NoMDEntries] 268 = 1
[MDEntryType] 269 = d (PACKET_DEPTH_ENCODED)
[ExecInst] 18 = E (UNCOMPRESSED_ENCODED)
[EncodedTextLen] 354 = 148
[EncodedText] 355 = JwgAABkAAACBgoLg65XS7rfQCLMwCgD+/////////4SBfsACAAoAAQABgIqA7QJ/wgN+HwV9LQV82wR79QR6EAZ5SAR4PQh3DwWKgZ0DglIGg4sGhBAGhQkGhhAHh0QFiFAGiQsFigMHgIABgQA=

A Packet Trade Encoded Snapshot
3 - MARKETDATASNAPSHOT
34=77|49=T4|56=T4Example|52=20131125-18:13:02.256|48=CME_20131200_ESZ3|387=667837|268=1|269=t|273=20131125-18:13:02.362|274=2|18=E|354=64|355=EUNNRV8yMDEzMTIwMF9FU1ozoNeo0u630Ai9MAoAfsACAAoAAAD+/////////wGB|

[MsgSeqNum] 34 = 77
[SenderCompID] 49 = T4
[TargetCompID] 56 = T4Example
[SendingTime] 52 = 20131125-18:13:02.256
[SecurityID] 48 = CME_20131200_ESZ3
[TotalVolumeTraded] 387 = 667837
[NoMDEntries] 268 = 1
[MDEntryType] 269 = t (PACKET_TRADE_ENCODED)
[MDEntryTime] 273 = 20131125-18:13:02.362
[TickDirection] 274 = 2 (MINUS_TICK)
[ExecInst] 18 = E (UNCOMPRESSED_ENCODED)
[EncodedTextLen] 354 = 64
[EncodedText] 355 = EUNNRV8yMDEzMTIwMF9FU1ozoNeo0u630Ai9MAoAfsACAAoAAAD+/////////wGB



FIX API Home Page.

Trade how you want, where you want

support@ctsfutures.com (312) 939 0164

2 Pierce Pl, Suite 200, Itasca, IL 60143

© 2009-2023 Cunningham Trading Systems LLC All rights reserved.